how to determine if a function is differentiable and continuous